<?php

/**
 * 群组合管理
 */
namespace Api\Controller;
use Api\Controller\HxController;
class EmotionController extends HxController {
		
	public function _initialize() {
		 parent::_initialize();
	}
	
	/*获取表情分组*/
	public function get_emotion_group(){
		$list=M("EmoticonGroup")->where("status=1")->field("id,name,icon")->select();
		$this->ajaxSuccessReturn($list);
	}
	/*根据表情包分组获取表情包资源*/
	public function get_emotion_by_id(){
		$group_id=I("group_id");
		if(empty($group_id)){
			$this->ajaxErrorReturn("参数错误");
		}else{
			$list=M("Emotion")->where("group_id=$group_id")->field("id,name,icon,group_id")->select();
			$this->ajaxSuccessReturn($list);
		}
	}
	
	
}

